package com.orderdetail.model;

import java.sql.Connection;

public class OrderDetailService {

	private Order_detailDAO_interface dao;
	
	public OrderDetailService() {
		dao = new Order_detailDAO();
	}
	
	public Order_detailVO addOrderDetail(Long ord_id ,Integer goodsNo ,Integer good_type ,byte[] good_pic ,Integer order_qt ,Integer price ,Connection conn) {
		Order_detailVO odVO = new Order_detailVO();
		odVO.setOrd_id(ord_id);
		odVO.setGoodsno(goodsNo);
		odVO.setGood_type(good_type);
		odVO.setGood_pic(good_pic);
		odVO.setOrder_qt(order_qt);
		odVO.setPrice(price);
		
		dao.insert(odVO ,conn);
		
		return odVO;
	}
}
